package org.ziyuandagong.account.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表（t_user），存储系统用户信息
 * </p>
 *
 * @author 自愿打工
 * @since 2024-12-06
 */
@TableName("t_user")
@ApiModel(value = "User对象", description = "用户表（t_user），存储系统用户信息")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户 ID，主键，采用UUID")
    private String userId;

    @ApiModelProperty("用户名，唯一且不能为空，用于用户登录标识")
    private String username;

    @ApiModelProperty("密码，存储加密后的密码信息")
    private String password;

    @ApiModelProperty("用户邮箱，可用于找回密码等功能，需符合邮箱格式规范")
    private String email;

    @ApiModelProperty("联系电话，用于用户账号的注册登录")
    private String phone;

    @ApiModelProperty("逻辑删除，如 逻辑删除 1（true）已删除， 0（false）未删除")
    private Boolean isDeleted;

    @ApiModelProperty("用户创建时间，记录用户账号创建的时间点")
    private LocalDateTime createTime;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
    public Boolean getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "User{" +
            "userId=" + userId +
            ", username=" + username +
            ", password=" + password +
            ", email=" + email +
            ", phone=" + phone +
            ", isDeleted=" + isDeleted +
            ", createTime=" + createTime +
        "}";
    }
}
